package com.daily.videoedit.model;


/**
 * Desc:用户表
 *
 * @author: yezhidong
 * @date: 2019 -07-09
 * @copyright: copyright (c) 2010-2019
 * @company: @咪咕动漫
 * @updater:
 * @updateTime:
 * @updateComments:
 */
public class User {

    public String userId;

    public String account;

    /**
     * 用户统一标识。
     * 针对一个微信开放平台帐号下的应用，同一用户的unionid是唯一的。
     */
    public String unionId;
    /**
     * 用户唯一标识
     */
    public String openId;

    public String nickName;
    public String sex;
    public String avatar;

    public String platform;

    /**
     * 登录类型
     * 0 三方登录
     * 1 账密登录
     */
    private int loginType;

    private String username;
    private String password;
    private String email;
    private Boolean emailVerified;
    private String sessionToken;
    private String mobilePhoneNumber;
    private Boolean mobilePhoneNumberVerified;

    /**
     * vip等级(0:注册用户，1:普通vip，2:高级vip)
     */
    private int vipFlag;

    /**
     * 是否绑定微信 0-否 1-是(绑定了unionId和openId) 2-只绑定了openId
     */
    private int bindWechat;

    /**
     * 是否绑定qq 0-否 1-是
     */
    private int bindQq;


    public String getUserId() {
        return this.userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUnionId() {
        return this.unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public String getOpenId() {
        return this.openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getSex() {
        return this.sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getPlatform() {
        return this.platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    /**
     * Desc:是否会员
     *
     * @return boolean
     * @author: yzd
     * @date: 2019 -09-24
     */
    public boolean isVip() {
        return vipFlag == 1;
    }


    public String getAccount() {
        return this.account;
    }

    public void setAccount(String account) {
        this.account = account;
    }


    public int getLoginType() {
        return this.loginType;
    }

    public void setLoginType(int loginType) {
        this.loginType = loginType;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setEmailVerified(Boolean emailVerified) {
        this.emailVerified = emailVerified;
    }

    public void setSessionToken(String sessionToken) {
        this.sessionToken = sessionToken;
    }

    public void setMobilePhoneNumber(String mobilePhoneNumber) {
        this.mobilePhoneNumber = mobilePhoneNumber;
    }

    public void setMobilePhoneNumberVerified(Boolean mobilePhoneNumberVerified) {
        this.mobilePhoneNumberVerified = mobilePhoneNumberVerified;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public Boolean getEmailVerified() {
        return emailVerified;
    }

    public String getSessionToken() {
        return sessionToken;
    }

    public String getMobilePhoneNumber() {
        return mobilePhoneNumber;
    }

    public Boolean getMobilePhoneNumberVerified() {
        return mobilePhoneNumberVerified;
    }

    public void setVipFlag(int vipFlag) {
        this.vipFlag = vipFlag;
    }

    public int getVipFlag() {
        return vipFlag;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getNickName() {
        return nickName;
    }

    public boolean isBindedWeChat() {
        return bindWechat != 0;
    }

    public boolean isBindedQQ() {
        return bindQq != 0;
    }

    public void bindWechat() {
        this.bindWechat = 1;
    }

    public void bindQq() {
        this.bindQq = 1;
    }

    public void setBindWechat(int bindWechat) {
        this.bindWechat = bindWechat;
    }

    public void setBindQq(int bindQq) {
        this.bindQq = bindQq;
    }

    public int getBindWechat() {
        return bindWechat;
    }

    public int getBindQq() {
        return bindQq;
    }

}
